home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7523 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: trojan.neta.com (Internet Access)!not-for-mail
  2. From: blair@trojan.neta.com (Blair P Houghton)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: sqrt() cheesy question
  5. Date: 23 Feb 1996 10:45:40 -0700
  6. Organization: Internet Access, Chandler AZ.
  7. Message-ID: <4gkug4$ss9@trojan.neta.com>
  8. References: <4gjmmt$lt7@hopi.dtcc.edu>
  9. NNTP-Posting-Host: trojan.neta.com
  10.  
  11. In article <4gjmmt$lt7@hopi.dtcc.edu>,
  12. Rob Wiltbank <w4582@hopi.dtcc.edu> wrote:
  13. >Howdy all.  I'm in a bind.
  14.  
  15. No, you're in a sqrt(3m); bind(2) is dealt with in another group.
  16.  
  17. >I'm in a beggining C course at school, and I'm about 2 weeks ahead of the 
  18. >class so I'm doing projects that the class hasn't even considered going 
  19. >over yet.  I'm still on the very newbie side of it all.
  20.  
  21. >Could someone post the function definition of the sqrt() function found 
  22. >in math.h?
  23.  
  24. In most cases, it just calls the FSQRT instruction for
  25. the processor, which either involves the FPU (if one
  26. is attached) or calls some microcode.
  27.  
  28. What you want isn't the function definition, it's the algorithm
  29. for doing square roots in an arithmetic way.
  30.  
  31. I'd suggest going to the library and looking up either
  32. _Seminumerical Algorithms_ by Donald Knuth (if you stay in
  33. SW engineering you will end up owning this book and the
  34. other two volumes in the series) or _Numerical Methods in
  35. C_ by I. Forget.  The latter one also comes in Fortran and
  36. Pascal versions, either of which will explain the algorithm.
  37.  
  38.                 --Blair
  39.                   "...knit one, perl two.
  40.                    And in Baseball today..."
  41.